package com.wn.class30.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * user_cupon
 * @author 
 */
public class UserCupon implements Serializable {
    /**
     * 用户优惠劵id
     */
    private Integer ucId;

    /**
     * 用户id

     */
    private Integer userId;

    /**
     * 优惠劵编号
     */
    private Integer cuponId;

    /**
     * 优惠劵数量
     */
    private Integer cuponNum;

    private Date cuponGettime;

    private static final long serialVersionUID = 1L;

    public Integer getUcId() {
        return ucId;
    }

    public void setUcId(Integer ucId) {
        this.ucId = ucId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCuponId() {
        return cuponId;
    }

    public void setCuponId(Integer cuponId) {
        this.cuponId = cuponId;
    }

    public Integer getCuponNum() {
        return cuponNum;
    }

    public void setCuponNum(Integer cuponNum) {
        this.cuponNum = cuponNum;
    }

    public Date getCuponGettime() {
        return cuponGettime;
    }

    public void setCuponGettime(Date cuponGettime) {
        this.cuponGettime = cuponGettime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCupon other = (UserCupon) that;
        return (this.getUcId() == null ? other.getUcId() == null : this.getUcId().equals(other.getUcId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getCuponId() == null ? other.getCuponId() == null : this.getCuponId().equals(other.getCuponId()))
            && (this.getCuponNum() == null ? other.getCuponNum() == null : this.getCuponNum().equals(other.getCuponNum()))
            && (this.getCuponGettime() == null ? other.getCuponGettime() == null : this.getCuponGettime().equals(other.getCuponGettime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUcId() == null) ? 0 : getUcId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getCuponId() == null) ? 0 : getCuponId().hashCode());
        result = prime * result + ((getCuponNum() == null) ? 0 : getCuponNum().hashCode());
        result = prime * result + ((getCuponGettime() == null) ? 0 : getCuponGettime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ucId=").append(ucId);
        sb.append(", userId=").append(userId);
        sb.append(", cuponId=").append(cuponId);
        sb.append(", cuponNum=").append(cuponNum);
        sb.append(", cuponGettime=").append(cuponGettime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}